﻿using System;
using SmartPeople.Framework.SecuritySpace;
using SmartPeople.Framework.SecuritySpace;

namespace SmartPeople.Framework.Security.Providers.XPO
{
    internal class XPSecuritySessionProvider : ISecuritySessionProvider
    {
        public ISecuritySession CreateSession(Guid userGID, string ipAddress, DateTime creationTime, int timeOut,
                                              DateTime lastActiveTime)
        {
          
            XPSecuritySession securitySession = new XPSecuritySession();
            securitySession.UserGID = userGID;
            securitySession.IPAddress = ipAddress;
            securitySession.CreationTime = creationTime;
            securitySession.TimeOut = timeOut;
            securitySession.LastActiveTime = lastActiveTime;
            securitySession.Save();
            return securitySession;
        }



    }
}